<?php
namespace Home\Controller;
use Think\Controller;
class IndexController extends Controller {
    public function index(){
       
       //在首页循环职位
       $model = D('recruit');

       $data = $model->select();

       $this->assign(data,$data);

       $this->display();
    }

    public function recruit($rid){

      //职位详情
      D('recruit');

      $model = D('recruit');

      $data = $model->find($rid);


      $this->assign("data",$data);

      $this->display();
    }

    public function zhaopin(){

      //添加职位
  		if($_POST){

  			$model = D('recruit');

  			$_POST['pubdate'] = time();

  			if($model->add($_POST)){
           }
  		}

  		
		$this->display();
}

}